Customizing Difficulty Levels
This guide will teach you how to customize the individual settings for difficulty levels (Settler through Deity). Notes: You must be playing with the Community Balance Overhaul mod enabled. Also, this guide was developed for the 10-8 Beta version and later. If you are modifying the file from an earlier version, you may encounter difficulties if you don't know what you're doing! DifficultyMod.xml Overview * The DifficultyMod.xml file overrides the BNW difficulty settings. The Windows file path is: Documents/My Games/Sid Meier's Civilization 5/MODS/(2) Community Balance Overhaul/Balance Changes/Difficulty/DifficultyMod.xml * It is divided into 9 different handicaps, also known as difficulty levels. These range from Settler to Deity, along with a special AI_DEFAULT difficulty, which AI players use. * Each handicap is divided into 5 sections. * It is important to note that AI free techs have been removed from all difficulty levels in Vox Populi via the DifficultyMod.sql file. Handicap Sections * Player Bonuses: Bonuses applying only to human players (AI players use the player bonuses from their special AI_DEFAULT difficulty). * City-State Bonuses: Bonuses applying only to City-States. * AI Bonuses: Bonuses applying to AI-controlled Civilizations. * Barbarians: Handicap values relating to Barbarians, which generally affect the human player. * Unused Values: Firaxis values which are not used in the code, but which must not be deleted (leave these as-is). Customizing Difficulty Settings This section concerns modifying the various difficulty settings for each handicap. Once you have opened the DifficultyMod.xml file, to change a value for a difficulty, you must simply change the number in the appropriate row. Caution: It is advised that you make a backup copy of the file before making changes. This way, they can easily be reverted. Example 1: Add a 20% unit maintenance discount for the human player on Chieftain. # Find HANDICAP_PRINCE. # Change the UnitCostPercent line to: 80 # Save your changes. Example 2: Add a starting Worker for human players to all difficulty levels. # Find HANDICAP_SETTLER. # Change the StartingWorkerUnits line to: 1 # Repeat steps 1-2 for each handicap up to HANDICAP_DEITY (but not AI_DEFAULT). # Save your changes. Example 3: Change the AI to always make optimal choices for City Production, Technology and Social Policy choices on all difficulties (remove randomness). # Find HANDICAP_SETTLER. # Change the CityProductionNumOptionsConsidered line to: 1 # Repeat step 2 for TechNumOptionsConsidered and PolicyNumOptionsConsidered. # Repeat steps 1-3 for each handicap up to HANDICAP_DEITY (but not AI_DEFAULT). # Save your changes. Notes * Changes made to one difficulty level will only apply to that difficulty level. * Changes made to the AI's special AI_DEFAULT difficulty level will apply to all difficulty levels, but only change this if you know what you're doing. Explanation of Settings This section will explain what the various values you can change do. To see the default values for each of these, please see AI and Difficulty. ''* Certain percentage values are marked with an asterisk. For these values, 100 equals normal cost. Values below 100 are discounts, values above 100 are increases.'' So, 80 would be a 20% discount, 30 would be a 70% discount, 150 would be a 50% increase, etc. Player Bonuses HappinessDefault: Bonus to Global Happiness from difficulty level. HappinessDefaultCapital: Bonus to the capital's Local Happiness. PopulationUnhappinessMod: Reduces citizen Unhappiness from needs (distress, boredom, etc.) by a %. Negative values reduce Unhappiness, positive values increase it. ExtraHappinessPerLuxury: Bonus to the amount of Global Happiness provided by each Luxury Resource. StartingPolicyPoints: Bonus Culture at game start (modified by game speed). FreeCulturePerTurn: Bonus to empire-wide Culture per turn. Gold: Bonus Gold at game start (modified by game speed). GoldFreeUnits: # of units that don't count when calculating unit Gold maintenance. ProductionFreeUnits: Base unit supply. Going above maximum unit supply results in empire-wide Production and Growth penalties. ProductionFreeUnitsPerCity: Base amount of unit supply provided by each owned city. ProductionFreeUnitsPopulationPercent: % of total citizens added to unit supply. (Note that puppet cities will only add half of their total population % modifier, unless you're playing Venice) StartingDefenseUnits: # of extra Warrior (or era equivalent) Units that the player starts the game with. StartingExploreUnits: # of extra Pathfinder (or era equivalent) Units that the player starts the game with, in addition to the one they normally start with. StartingWorkerUnits: # of extra ''Worker Units that the player starts the game with. '*RouteCostPercent:' Percentage discount on Gold maintenance for tile improvements (roads/railroads). '*UnitCostPercent:' Percentage discount on Gold maintenance for Units. '*BuildingCostPercent:' Percentage discount on Gold maintenance for Buildings. '*ImprovementCostPercent:' Percentage discount on the amount of time required for Workers to construct Improvements. '*PolicyPercent:' Percentage discount on the Culture cost of Social Policies. '*ResearchPercent:' Percentage discount on the Science cost of Technologies. City-State Bonuses '''StartingMinorDefenseUnits:' # of Warrior (or era equivalent) Units that City-States start the game with. AI Bonuses CityProductionNumOptionsConsidered: The AI will randomly pick between the top X choices when choosing City Production, where X is the value of CityProductionNumOptionsConsidered. TechNumOptionsConsidered: The AI will randomly pick between the top X choices when choosing Technologies, where X is the value of TechNumOptionsConsidered. PolicyNumOptionsConsidered: The AI will randomly pick between the top X choices when choosing Social Policies, where X is the value of PolicyNumOptionsConsidered. AIDeclareWarProb: This value affects AI hostility towards human players who are close to a victory condition ONLY. Higher values make the AI more aggressive in the lategame and lower DoF/DP willingness.In the DoRelationshipPairing function, (15 * AIDeclareWarProb) is divided by 100, ignoring any remainder. For each victory condition that the human player is close to achieving, this value is added to enemy weight (which increases standing as a competitor) and subtracted from DoF and DP weights (which control the desire to make Declarations of Friendship and Defensive Pacts). Note: AIs also gain enmity towards other AIs that are approaching victory. For other AIs, regardless of difficulty, 20 is added to enemy weight and 10 is subtracted from DoF and DP weights for each victory condition the opposing AI is close to achieving. AIStartingDefenseUnits: # of extra Warrior (or era equivalent) Units that AI civilizations start the game with. AIStartingExploreUnits: # of extra Pathfinder (or era equivalent) Units that AI civilizations start the game with, in addition to the one they normally start with. AIStartingWorkerUnits: # of extra Worker Units that AI civilizations start the game with. AIStartingUnitMultiplier: # of extra ''Settler Units that AI civilizations start the game with, in addition to the one they normally start with. '''AIWorkRateModifier:' % bonus to AI Worker speed when constructing/repairing Improvements or scrubbing fallout. At a value of 100, they work twice as fast as normal. AIUnhappinessPercent: Reduces citizen Unhappiness from needs (distress, boredom, etc.) for AI civilizations by a %. Negative values reduce Unhappiness, positive values increase it. *AIGrowthPercent: Percentage discount on the amount of Food required for AI cities to grow. *AIUnitCostPercent: Percentage discount on AI Gold maintenance for Units. *AIBuildingCostPercent: Percentage discount on AI Gold maintenance for Buildings. *AIUnitUpgradePercent: Percentage discount on the Gold cost for AI Units to upgrade. *AIWorldConstructPercent: Percentage discount on Production cost of World Wonders. *AIWorldCreatePercent: Percentage discount on the Production cost of World Congress projects. AIFreeXP: Amount of extra XP that all AI military Units start with (this can result in free promotions). AIFreeXPPercent: % bonus to the amount of XP that AI military Units gain from combat. 100 = twice as much XP. VisionBonus: Extra Sight bonus for all AI Units (in # tiles). Sight can still be blocked by hills, forests, etc. This bonus is NOT given to units that gain XP from revealing tiles (i.e. scouts). Per Era Bonuses *AITrainPercent: Discount on the base Production cost of Units for the AI. Reduced by AIPerEraModifier every era. *AIConstructPercent: Discount on the base Production cost of Buildings for the AI. Reduced by AIPerEraModifier every era. *AICreatePercent: Discount on the base Production cost of certain projects, such as the Apollo Project. This does NOT apply to processes like Arts, Research or Wealth. Reduced by AIPerEraModifier every era. AIUnitSupplyPercent: % bonus to total AI unit supply cap. Increased by AIPerEraModifier every era. This bonus is not given to AI teammates of human players. AIPerEraModifier: Increases the bonuses above based on era. 0 means no change, -1 means -1% of base Production costs and +1% unit supply for every era, and so on. Be careful with this one! CBP Difficulty Bonus These values control the amount of bonus yields the AI gains when founding/conquering Cities or triggering Historic Events. The full details of this function can be found here. DifficultyBonusBase: Multiplier on the amount of total yields gained. If 0, no bonus yields are gained. DifficultyBonusA: The "early game bonus". DifficultyBonusB: The "mid game bonus". In the yield function, it is multiplied by the current era. DifficultyBonusC: The "late game bonus". In the yield function, it is multiplied by the current era squared (era^2). Barbarians EarliestBarbarianReleaseTurn: The # of turns that must pass before Barbarians can enter the human player's lands. BarbarianBonus: % bonus to player Combat Strength/Ranged Combat Strength VS Barbarians. AIBarbarianBonus: % bonus to AI Combat Strength/Ranged Combat Strength VS Barbarians. BarbCampGold: Gold bonus from clearing a Barbarian encampment (modified by game speed). BarbSpawnMod: Delays spawns from Barbarian encampments by X turns (modified by game speed). BarbarianLandTargetRange: Pathfinder range when Barbarians are searching for visible Caravans to plunder. BarbarianSeaTargetRange: Pathfinder range when Barbarian ships are searching for visible Cargo Ships to plunder. Unused Values These do nothing, but should be left as-is. Notes